package com.blockchain.console.servlets.content.cjwt;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.blockchain.console.service.content.QuestionManage;
import com.blockchain.framework.http.servlet.annotation.Right;
import com.blockchain.framework.service.ServiceSession;
import com.blockchain.util.parser.IntegerParser;
@Right(id = "C_CONTENT_CJWT_DELETEQUESTION", name = "帮助中心-删除")
public class DeleteQuestion extends AbstractQuestionServlet{

	
	private static final long serialVersionUID = 1L;

	@Override
	protected void processPost(HttpServletRequest request,
			HttpServletResponse response, ServiceSession serviceSession)
			throws Throwable {
		processGet(request, response, serviceSession);
	}

	@Override
	protected void processGet(HttpServletRequest request,
			HttpServletResponse response, ServiceSession serviceSession)
			throws Throwable {
		QuestionManage manage = serviceSession
				.getService(QuestionManage.class);
		manage.delete(IntegerParser.parseArray(request.getParameterValues("id")));
		sendRedirect(request, response, getController().getURI(request, QuestionList.class));
	}
	




}
